#ifndef __SERVER_H
#define __SERVER_H

#include <stdio.h>
#include <pthread.h>

int yaftp_main();
int get_listen_socket();

struct server_global_conf
{
     FILE* logs;		/* log stream */
     int client_default_timeout;
     const char* welcome_msg;
     unsigned short listen_port;
     unsigned short pasv_min_port;
     unsigned short pasv_max_port;
};

extern struct server_global_conf *server_conf;

struct connection
{
     int cmdfd;
     int datafd;
     int client_timeout;
     int login_state;
     char* username;
     char *oldname;
     pthread_mutex_t* datafd_mutex;
     
};

extern struct connection *client_conn;

#endif
